/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package documenteditor.entidade.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author gleidson.moura
 */
@Entity
@Table(name="PROFISSAO")
@SequenceGenerator(name="GEN_PROFISSAO", sequenceName="GEN_PROFISSAO_ID")
public class Profissao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name="ID_PROFISSAO")
    @GeneratedValue(strategy = GenerationType.AUTO, generator="GEN_PROFISSAO")
    private Long idProfissao;

    @Column(name="NOME_PROFISSAO", nullable=false)
    private String nomeProfissao;

    @Column(name="REMUNERACAO_MEDIA", nullable=true)
    private Double remuneracaoMedia;

    public Long getIdProfissao() {
        return idProfissao;
    }

    public void setIdProfissao(Long idProfissao) {
        this.idProfissao = idProfissao;
    }

    public String getNomeProfissao() {
        return nomeProfissao;
    }

    public void setNomeProfissao(String nomeProfissao) {
        this.nomeProfissao = nomeProfissao;
    }

    public Double getRemuneracaoMedia() {
        return remuneracaoMedia;
    }

    public void setRemuneracaoMedia(Double remuneracaoMedia) {
        this.remuneracaoMedia = remuneracaoMedia;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idProfissao != null ? idProfissao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Profissao)) {
            return false;
        }
        Profissao other = (Profissao) object;
        if ((this.idProfissao == null && other.idProfissao != null) || (this.idProfissao != null && !this.idProfissao.equals(other.idProfissao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "documenteditor.entidade.model.dominio.Profissao[id=" + idProfissao + "]";
    }

}
